//
//  IMSQRGenerateManager.h
//  Loccitane_Staff
//
//  Created by Allen on 2018/9/3.
//  Copyright © 2018年 Allen. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface IMSQRGenerateManager : NSObject
/** 生成一张普通的二维码 */
+ (UIImage *)IMS_generateWithDefaultQRCodeData:(NSString *)data
                                imageViewWidth:(CGFloat)imageViewWidth;

/** 生成一张带有logo的二维码（logoScaleToSuperView：相对于父视图的缩放比取值范围0-1；0，不显示，1，代表与父视图大小相同）*/
+ (UIImage *)IMS_generateWithLogoQRCodeData:(NSString *)data
                              logoImageName:(NSString *)logoImageName
                       logoScaleToSuperView:(CGFloat)logoScaleToSuperView;

/** 生成一张彩色的二维码 */
+ (UIImage *)IMS_generateWithColorQRCodeData:(NSString *)data
                             backgroundColor:(CIColor *)backgroundColor
                                   mainColor:(CIColor *)mainColor;
#pragma mark 读取图片二维码

/**
 *  读取图片中二维码信息
 *
 *  @param image 图片
 *
 *  @return 二维码内容
 */
+ (NSString *)readQRCodeFromImage:(UIImage *)image;
#pragma mark - 生成条形码
//Avilable in iOS 8.0 and later
+ (UIImage *)barcodeImageWithContent:(NSString *)content
                       codeImageSize:(CGSize)size
                                 red:(CGFloat)red
                               green:(CGFloat)green
                                blue:(CGFloat)blue;





@end
